package com.goodving.guli.utility;

import android.os.Parcel;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.util.SparseArray;
import android.view.ViewGroup;

import com.goodving.guli.fragment.PageViewListFragment;
import com.goodving.guli.model.DailyStats;

/**
 * Created by Administrator on 2015-11-16.
 */
/* renamed from: cn.ledongli.ldl.a.z */
public class C1073z extends FragmentStatePagerAdapter {
    public SparseArray<Fragment> f3838a;
    public int f3839b;

    public C1073z(Fragment fragment, int i) {
        super(fragment.getChildFragmentManager());
        this.f3838a = new SparseArray();
        this.f3839b = i;
    }

    public int getCount() {
        return this.f3839b;
    }

//    public Fragment getItem(int i) {
//        LdlDate a = LdlDate.m8856a();
//        for (int i2 = this.f3839b - 1; i2 > i; i2--) {
//            a = a.m8881n();
//        }
//        return PageViewListFragment.newInstance(i, StatsManagerWrapper.m8763a(C1481u.m12068a(), a));
//        Fragment abc = new Fragment();
//        return abc;
//    }

    public Fragment getItem(int i) {
        LdlDate a = LdlDate.m8856a();
        for (int i2 = this.f3839b - 1; i2 > i; i2--) {
            a = a.m8881n();
        }
        return PageViewListFragment.newInstance(i, new DailyStats(Parcel.obtain()));
    }

    public int getItemPosition(Object obj) {
        return -2;
    }

    public Object instantiateItem(ViewGroup viewGroup, int i) {
        Fragment fragment = (Fragment) super.instantiateItem(viewGroup, i);
        this.f3838a.put(i, fragment);
        return fragment;
    }

    public void destroyItem(ViewGroup viewGroup, int i, Object obj) {
        this.f3838a.remove(i);
        super.destroyItem(viewGroup, i, obj);
    }
}
